package com.kitten.note.biz.domain.mapper;

import com.kitten.note.biz.domain.dataobject.NoteDO;

public interface NoteDOMapper {
    int deleteByPrimaryKey(Long id);

    int insert(NoteDO record);

    int insertSelective(NoteDO record);

    NoteDO selectByPrimaryKey(Long id);

    int selectCountByNoteId(Long noteId);

    int updateByPrimaryKeySelective(NoteDO record);

    int updateByPrimaryKey(NoteDO record);

    /**
     * 更新笔记可见性
     */
    int updateVisibleOnlyMe(NoteDO noteDO);

    /**
     * 更新笔记是否置顶
     */
    int updateIsTop(NoteDO noteDO);

    /**
     * 获取笔记的创建者id
     * @param noteId
     * @return
     */
    Long selectCreatorIdByNoteId(Long noteId);
}